home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Tool Chest / Interfaces / Universal Interfaces 2.0a3 / Universal AIncludes / ImageCompression.a < prev    next >
Encoding:
Text File  |  1994-11-11  |  23.6 KB  |  1,360 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ImageCompression.a
  3. ;
  4. ;    Copyright:    © 1984-1994 by Apple Computer, Inc.
  5. ;                All rights reserved.
  6. ;
  7. ;    Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8. ;
  9. ;    Bugs?:        If you find a problem with this file, send the file and version
  10. ;                information (from above) and the problem description to:
  11. ;
  12. ;                    Internet:    apple.bugs@applelink.apple.com
  13. ;                    AppleLink:    APPLE.BUGS
  14. ;
  15. ;
  16.  
  17.     IF &TYPE('__IMAGECOMPRESSION__') = 'UNDEFINED' THEN
  18. __IMAGECOMPRESSION__ SET 1
  19.  
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24. ;        include 'ConditionalMacros.a'                                ;
  25.  
  26.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  27.     include 'Quickdraw.a'
  28.     ENDIF
  29. ;        include 'MixedMode.a'                                        ;
  30. ;        include 'QuickdrawText.a'                                    ;
  31.  
  32.     IF &TYPE('__QDOFFSCREEN__') = 'UNDEFINED' THEN
  33.     include 'QDOffscreen.a'
  34.     ENDIF
  35. ;        include 'Errors.a'                                            ;
  36.  
  37.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  38.     include 'Components.a'
  39.     ENDIF
  40.  
  41.     IF &TYPE('__WINDOWS__') = 'UNDEFINED' THEN
  42.     include 'Windows.a'
  43.     ENDIF
  44. ;        include 'Memory.a'                                            ;
  45. ;        include 'Events.a'                                            ;
  46. ;            include 'OSUtils.a'                                    ;
  47. ;        include 'Controls.a'                                        ;
  48. ;            include 'Menus.a'                                        ;
  49.  
  50.     IF &TYPE('__STANDARDFILE__') = 'UNDEFINED' THEN
  51.     include 'StandardFile.a'
  52.     ENDIF
  53. ;        include 'Dialogs.a'                                        ;
  54. ;            include 'TextEdit.a'                                    ;
  55. ;        include 'Files.a'                                            ;
  56. MatrixRecord             RECORD    0
  57. matrix                     ds.l    9
  58. sizeof                     EQU    36
  59.                         ENDR
  60.  
  61. FixedPoint                 RECORD    0
  62. x                         ds.l    1
  63. y                         ds.l    1
  64. sizeof                     EQU    8
  65.                         ENDR
  66.  
  67. FixedRect                 RECORD    0
  68. left                     ds.l    1
  69. top                         ds.l    1
  70. right                     ds.l    1
  71. bottom                     ds.l    1
  72. sizeof                     EQU    16
  73.                         ENDR
  74.  
  75. ; These are the bits that are set in the Component flags, and also in the codecInfo struct. 
  76.  
  77. codecInfoDoes1                    EQU        (1 << 0)
  78. codecInfoDoes2                    EQU        (1 << 1)
  79. codecInfoDoes4                    EQU        (1 << 2)
  80. codecInfoDoes8                    EQU        (1 << 3)
  81. codecInfoDoes16                    EQU        (1 << 4)
  82. codecInfoDoes32                    EQU        (1 << 5)
  83. codecInfoDoesDither                EQU        (1 << 6)
  84. codecInfoDoesStretch            EQU        (1 << 7)
  85. codecInfoDoesShrink                EQU        (1 << 8)
  86. codecInfoDoesMask                EQU        (1 << 9)
  87. codecInfoDoesTemporal            EQU        (1 << 10)
  88. codecInfoDoesDouble                EQU        (1 << 11)
  89. codecInfoDoesQuad                EQU        (1 << 12)
  90. codecInfoDoesHalf                EQU        (1 << 13)
  91. codecInfoDoesQuarter            EQU        (1 << 14)
  92. codecInfoDoesRotate                EQU        (1 << 15)
  93. codecInfoDoesHorizFlip            EQU        (1 << 16)
  94. codecInfoDoesVertFlip            EQU        (1 << 17)
  95. codecInfoDoesSkew                EQU        (1 << 18)
  96. codecInfoDoesBlend                EQU        (1 << 19)
  97. codecInfoDoesWarp                EQU        (1 << 20)
  98. codecInfoDoesRecompress            EQU        (1 << 21)
  99. codecInfoDoesSpool                EQU        (1 << 22)
  100. codecInfoDoesRateConstrain        EQU        (1 << 23)
  101.  
  102. codecInfoDepth1                    EQU        (1 << 0)
  103. codecInfoDepth2                    EQU        (1 << 1)
  104. codecInfoDepth4                    EQU        (1 << 2)
  105. codecInfoDepth8                    EQU        (1 << 3)
  106. codecInfoDepth16                EQU        (1 << 4)
  107. codecInfoDepth32                EQU        (1 << 5)
  108. codecInfoDepth24                EQU        (1 << 6)
  109. codecInfoDepth33                EQU        (1 << 7)
  110. codecInfoDepth34                EQU        (1 << 8)
  111. codecInfoDepth36                EQU        (1 << 9)
  112. codecInfoDepth40                EQU        (1 << 10)
  113. codecInfoStoresClut                EQU        (1 << 11)
  114. codecInfoDoesLossless            EQU        (1 << 12)
  115. codecInfoSequenceSensitive        EQU        (1 << 13)
  116.  
  117. codecFlagUseImageBuffer            EQU        (1 << 0)
  118. codecFlagUseScreenBuffer        EQU        (1 << 1)
  119. codecFlagUpdatePrevious            EQU        (1 << 2)
  120. codecFlagNoScreenUpdate            EQU        (1 << 3)
  121. codecFlagWasCompressed            EQU        (1 << 4)
  122. codecFlagDontOffscreen            EQU        (1 << 5)
  123. codecFlagUpdatePreviousComp        EQU        (1 << 6)
  124. codecFlagForceKeyFrame            EQU        (1 << 7)
  125. codecFlagOnlyScreenUpdate        EQU        (1 << 8)
  126. codecFlagLiveGrab                EQU        (1 << 9)
  127. codecFlagDontUseNewImageBuffer    EQU        (1 << 10)
  128. codecFlagInterlaceUpdate        EQU        (1 << 11)
  129. codecFlagCatchUpDiff            EQU        (1 << 12)
  130. codecFlagUsedNewImageBuffer        EQU        (1 << 14)
  131. codecFlagUsedImageBuffer        EQU        (1 << 15)
  132.  
  133. ; The minimum data size for spooling in or out data 
  134. codecMinimumDataSize            EQU        32768
  135.  
  136. compressorComponentType            EQU        'imco'                ; the type for "Components" which compress images 
  137. decompressorComponentType        EQU        'imdc'
  138.  
  139. anyCodec                        EQU        0                    ; take first working codec of given type 
  140. bestSpeedCodec                    EQU        -1                    ; take fastest codec of given type 
  141. bestFidelityCodec                EQU        -2                    ; take codec which is most accurate 
  142. bestCompressionCodec            EQU        -3                    ; take codec of given type that is most accurate 
  143.  
  144. codecLosslessQuality            EQU        $400
  145. codecMaxQuality                    EQU        $3ff
  146. codecMinQuality                    EQU        $000
  147. codecLowQuality                    EQU        $100
  148. codecNormalQuality                EQU        $200
  149. codecHighQuality                EQU        $300
  150.  
  151. codecCompletionSource            EQU        (1 << 0)            ; asynchronous codec is done with source data 
  152. codecCompletionDest                EQU        (1 << 1)            ; asynchronous codec is done with destination data 
  153.  
  154. codecProgressOpen                EQU        0
  155. codecProgressUpdatePercent        EQU        1
  156. codecProgressClose                EQU        2
  157.  
  158. ICMProgressProcRecord     RECORD    0
  159. progressProc             ds.l    1
  160. progressRefCon             ds.l    1
  161. sizeof                     EQU    8
  162.                         ENDR
  163.  
  164. ICMCompletionProcRecord RECORD    0
  165. completionProc             ds.l    1
  166. completionRefCon         ds.l    1
  167. sizeof                     EQU    8
  168.                         ENDR
  169.  
  170. ICMDataProcRecord         RECORD    0
  171. dataProc                 ds.l    1
  172. dataRefCon                 ds.l    1
  173. sizeof                     EQU    8
  174.                         ENDR
  175.  
  176. ICMFlushProcRecord         RECORD    0
  177. flushProc                 ds.l    1
  178. flushRefCon                 ds.l    1
  179. sizeof                     EQU    8
  180.                         ENDR
  181.  
  182. ICMAlignmentProcRecord     RECORD    0
  183. alignmentProc             ds.l    1
  184. alignmentRefCon             ds.l    1
  185. sizeof                     EQU    8
  186.                         ENDR
  187.  
  188. DataRateParams             RECORD    0
  189. dataRate                 ds.l    1
  190. dataOverrun                 ds.l    1
  191. frameDuration             ds.l    1
  192. keyFrameRate             ds.l    1
  193. minSpatialQuality         ds.l    1
  194. minTemporalQuality         ds.l    1
  195. sizeof                     EQU    24
  196.                         ENDR
  197.  
  198. ImageDescription         RECORD    0
  199. idSize                     ds.l    1                                    ; total size of ImageDescription including extra data ( CLUTs and other per sequence data 
  200. cType                     ds.l    1                                    ; what kind of codec compressed this data 
  201. resvd1                     ds.l    1                                    ; reserved for Apple use 
  202. resvd2                     ds.w    1                                    ; reserved for Apple use 
  203. dataRefIndex             ds.w    1                                    ; set to zero  
  204. version                     ds.w    1                                    ; which version is this data 
  205. revisionLevel             ds.w    1                                    ; what version of that codec did this 
  206. vendor                     ds.l    1                                    ; whose  codec compressed this data 
  207. temporalQuality             ds.l    1                                    ; what was the temporal quality factor  
  208. spatialQuality             ds.l    1                                    ; what was the spatial quality factor 
  209. width                     ds.w    1                                    ; how many pixels wide is this data 
  210. height                     ds.w    1                                    ; how many pixels high is this data 
  211. hRes                     ds.l    1                                    ; horizontal resolution 
  212. vRes                     ds.l    1                                    ; vertical resolution 
  213. dataSize                 ds.l    1                                    ; if known, the size of data for this image descriptor 
  214. frameCount                 ds.w    1                                    ; number of frames this description applies to 
  215. name                     ds.l    8                                    ; name of codec ( in case not installed )  
  216. depth                     ds.w    1                                    ; what depth is this data (1-32) or ( 33-40 grayscale ) 
  217. clutID                     ds.w    1                                    ; clut id or if 0 clut follows  or -1 if no clut 
  218. sizeof                     EQU    86
  219.                         ENDR
  220.  
  221. CodecInfo                 RECORD    0
  222. typeName                 ds.l    8                                    ; name of the codec type i.e.: 'Apple Image Compression' 
  223. version                     ds.w    1                                    ; version of the codec data that this codec knows about 
  224. revisionLevel             ds.w    1                                    ; revision level of this codec i.e: 0x00010001 (1.0.1) 
  225. vendor                     ds.l    1                                    ; Maker of this codec i.e: 'appl' 
  226. decompressFlags             ds.l    1                                    ; codecInfo flags for decompression capabilities 
  227. compressFlags             ds.l    1                                    ; codecInfo flags for compression capabilities 
  228. formatFlags                 ds.l    1                                    ; codecInfo flags for compression format details 
  229. compressionAccuracy         ds.b    1                                    ; measure (1-255) of accuracy of this codec for compress (0 if unknown) 
  230. decompressionAccuracy     ds.b    1                                    ; measure (1-255) of accuracy of this codec for decompress (0 if unknown) 
  231. compressionSpeed         ds.w    1                                    ; ( millisecs for compressing 320x240 on base mac II) (0 if unknown)  
  232. decompressionSpeed         ds.w    1                                    ; ( millisecs for decompressing 320x240 on mac II)(0 if unknown)  
  233. compressionLevel         ds.b    1                                    ; measure (1-255) of compression level of this codec (0 if unknown)  
  234. resvd                     ds.b    1                                    ; pad 
  235. minimumHeight             ds.w    1                                    ; minimum height of image (block size) 
  236. minimumWidth             ds.w    1                                    ; minimum width of image (block size) 
  237. decompressPipelineLatency ds.w    1                                    ; in milliseconds ( for asynchronous codecs ) 
  238. compressPipelineLatency     ds.w    1                                    ; in milliseconds ( for asynchronous codecs ) 
  239. privateData                 ds.l    1
  240. sizeof                     EQU    72
  241.                         ENDR
  242.  
  243. CodecNameSpec             RECORD    0
  244. codec                     ds.l    1
  245. cType                     ds.l    1
  246. typeName                 ds.l    8
  247. name                     ds.l    1
  248. sizeof                     EQU    44
  249.                         ENDR
  250.  
  251. CodecNameSpecList         RECORD    0
  252. count                     ds.w    1
  253. list                     ds        CodecNameSpec
  254. sizeof                     EQU    46
  255.                         ENDR
  256.  
  257.  
  258. defaultDither                    EQU        0
  259. forceDither                        EQU        1
  260. suppressDither                    EQU        2
  261. useColorMatching                EQU        4
  262.  
  263. ICMFrameTimeRecord         RECORD    0
  264. value                     ds        wide                                ; frame time
  265. scale                     ds.l    1                                    ; timescale of value/duration fields
  266. base                     ds.l    1                                    ; timebase
  267. duration                 ds.l    1                                    ; duration frame is to be displayed (0 if unknown)
  268. rate                     ds.l    1                                    ; rate of timebase relative to wall-time
  269. sizeof                     EQU    24
  270.                         ENDR
  271.  
  272.     IF GENERATING68K THEN
  273.         Macro
  274.         _CodecManagerVersion
  275.             moveq    #0,d0
  276.             dc.w     $AAA3
  277.         EndM
  278.     ELSE
  279.         IMPORT    CodecManagerVersion
  280.     ENDIF
  281.  
  282.     IF GENERATING68K THEN
  283.         Macro
  284.         _GetCodecNameList
  285.             moveq    #1,d0
  286.             dc.w     $AAA3
  287.         EndM
  288.     ELSE
  289.         IMPORT    GetCodecNameList
  290.     ENDIF
  291.  
  292.     IF GENERATING68K THEN
  293.         Macro
  294.         _DisposeCodecNameList
  295.             moveq    #15,d0
  296.             dc.w     $AAA3
  297.         EndM
  298.     ELSE
  299.         IMPORT    DisposeCodecNameList
  300.     ENDIF
  301.  
  302.     IF GENERATING68K THEN
  303.         Macro
  304.         _GetCodecInfo
  305.             moveq    #3,d0
  306.             dc.w     $AAA3
  307.         EndM
  308.     ELSE
  309.         IMPORT    GetCodecInfo
  310.     ENDIF
  311.  
  312.     IF GENERATING68K THEN
  313.         Macro
  314.         _GetMaxCompressionSize
  315.             moveq    #4,d0
  316.             dc.w     $AAA3
  317.         EndM
  318.     ELSE
  319.         IMPORT    GetMaxCompressionSize
  320.     ENDIF
  321.  
  322.     IF GENERATING68K THEN
  323.         Macro
  324.         _GetCompressionTime
  325.             moveq    #5,d0
  326.             dc.w     $AAA3
  327.         EndM
  328.     ELSE
  329.         IMPORT    GetCompressionTime
  330.     ENDIF
  331.  
  332.     IF GENERATING68K THEN
  333.         Macro
  334.         _CompressImage
  335.             moveq    #6,d0
  336.             dc.w     $AAA3
  337.         EndM
  338.     ELSE
  339.         IMPORT    CompressImage
  340.     ENDIF
  341.  
  342.     IF GENERATING68K THEN
  343.         Macro
  344.         _FCompressImage
  345.             moveq    #7,d0
  346.             dc.w     $AAA3
  347.         EndM
  348.     ELSE
  349.         IMPORT    FCompressImage
  350.     ENDIF
  351.  
  352.     IF GENERATING68K THEN
  353.         Macro
  354.         _DecompressImage
  355.             moveq    #8,d0
  356.             dc.w     $AAA3
  357.         EndM
  358.     ELSE
  359.         IMPORT    DecompressImage
  360.     ENDIF
  361.  
  362.     IF GENERATING68K THEN
  363.         Macro
  364.         _FDecompressImage
  365.             moveq    #9,d0
  366.             dc.w     $AAA3
  367.         EndM
  368.     ELSE
  369.         IMPORT    FDecompressImage
  370.     ENDIF
  371.  
  372.     IF GENERATING68K THEN
  373.         Macro
  374.         _CompressSequenceBegin
  375.             moveq    #10,d0
  376.             dc.w     $AAA3
  377.         EndM
  378.     ELSE
  379.         IMPORT    CompressSequenceBegin
  380.     ENDIF
  381.  
  382.     IF GENERATING68K THEN
  383.         Macro
  384.         _CompressSequenceFrame
  385.             moveq    #11,d0
  386.             dc.w     $AAA3
  387.         EndM
  388.     ELSE
  389.         IMPORT    CompressSequenceFrame
  390.     ENDIF
  391.  
  392.     IF GENERATING68K THEN
  393.         Macro
  394.         _DecompressSequenceBegin
  395.             moveq    #13,d0
  396.             dc.w     $AAA3
  397.         EndM
  398.     ELSE
  399.         IMPORT    DecompressSequenceBegin
  400.     ENDIF
  401.  
  402.     IF GENERATING68K THEN
  403.         Macro
  404.         _DecompressSequenceBeginS
  405.             dc.w     $203C
  406.             dc.w     $0030
  407.             dc.w     $005D
  408.             dc.w     $AAA3
  409.         EndM
  410.     ELSE
  411.         IMPORT    DecompressSequenceBeginS
  412.     ENDIF
  413.  
  414.     IF GENERATING68K THEN
  415.         Macro
  416.         _DecompressSequenceFrame
  417.             moveq    #14,d0
  418.             dc.w     $AAA3
  419.         EndM
  420.     ELSE
  421.         IMPORT    DecompressSequenceFrame
  422.     ENDIF
  423.  
  424.     IF GENERATING68K THEN
  425.         Macro
  426.         _DecompressSequenceFrameS
  427.             dc.w     $203C
  428.             dc.w     $0016
  429.             dc.w     $0047
  430.             dc.w     $AAA3
  431.         EndM
  432.     ELSE
  433.         IMPORT    DecompressSequenceFrameS
  434.     ENDIF
  435.  
  436.     IF GENERATING68K THEN
  437.         Macro
  438.         _DecompressSequenceFrameWhen
  439.             dc.w     $203C
  440.             dc.w     $001A
  441.             dc.w     $005E
  442.             dc.w     $AAA3
  443.         EndM
  444.     ELSE
  445.         IMPORT    DecompressSequenceFrameWhen
  446.     ENDIF
  447.  
  448.     IF GENERATING68K THEN
  449.         Macro
  450.         _CDSequenceFlush
  451.             dc.w     $203C
  452.             dc.w     $0004
  453.             dc.w     $005F
  454.             dc.w     $AAA3
  455.         EndM
  456.     ELSE
  457.         IMPORT    CDSequenceFlush
  458.     ENDIF
  459.  
  460.     IF GENERATING68K THEN
  461.         Macro
  462.         _SetDSequenceMatrix
  463.             moveq    #16,d0
  464.             dc.w     $AAA3
  465.         EndM
  466.     ELSE
  467.         IMPORT    SetDSequenceMatrix
  468.     ENDIF
  469.  
  470.     IF GENERATING68K THEN
  471.         Macro
  472.         _SetDSequenceMatte
  473.             moveq    #17,d0
  474.             dc.w     $AAA3
  475.         EndM
  476.     ELSE
  477.         IMPORT    SetDSequenceMatte
  478.     ENDIF
  479.  
  480.     IF GENERATING68K THEN
  481.         Macro
  482.         _SetDSequenceMask
  483.             moveq    #18,d0
  484.             dc.w     $AAA3
  485.         EndM
  486.     ELSE
  487.         IMPORT    SetDSequenceMask
  488.     ENDIF
  489.  
  490.     IF GENERATING68K THEN
  491.         Macro
  492.         _SetDSequenceTransferMode
  493.             moveq    #19,d0
  494.             dc.w     $AAA3
  495.         EndM
  496.     ELSE
  497.         IMPORT    SetDSequenceTransferMode
  498.     ENDIF
  499.  
  500.     IF GENERATING68K THEN
  501.         Macro
  502.         _SetDSequenceDataProc
  503.             moveq    #20,d0
  504.             dc.w     $AAA3
  505.         EndM
  506.     ELSE
  507.         IMPORT    SetDSequenceDataProc
  508.     ENDIF
  509.  
  510.     IF GENERATING68K THEN
  511.         Macro
  512.         _SetDSequenceAccuracy
  513.             moveq    #52,d0
  514.             dc.w     $AAA3
  515.         EndM
  516.     ELSE
  517.         IMPORT    SetDSequenceAccuracy
  518.     ENDIF
  519.  
  520.     IF GENERATING68K THEN
  521.         Macro
  522.         _SetDSequenceSrcRect
  523.             moveq    #53,d0
  524.             dc.w     $AAA3
  525.         EndM
  526.     ELSE
  527.         IMPORT    SetDSequenceSrcRect
  528.     ENDIF
  529.  
  530.     IF GENERATING68K THEN
  531.         Macro
  532.         _GetDSequenceImageBuffer
  533.             moveq    #21,d0
  534.             dc.w     $AAA3
  535.         EndM
  536.     ELSE
  537.         IMPORT    GetDSequenceImageBuffer
  538.     ENDIF
  539.  
  540.     IF GENERATING68K THEN
  541.         Macro
  542.         _GetDSequenceScreenBuffer
  543.             moveq    #22,d0
  544.             dc.w     $AAA3
  545.         EndM
  546.     ELSE
  547.         IMPORT    GetDSequenceScreenBuffer
  548.     ENDIF
  549.  
  550.     IF GENERATING68K THEN
  551.         Macro
  552.         _SetCSequenceQuality
  553.             moveq    #23,d0
  554.             dc.w     $AAA3
  555.         EndM
  556.     ELSE
  557.         IMPORT    SetCSequenceQuality
  558.     ENDIF
  559.  
  560.     IF GENERATING68K THEN
  561.         Macro
  562.         _SetCSequencePrev
  563.             moveq    #24,d0
  564.             dc.w     $AAA3
  565.         EndM
  566.     ELSE
  567.         IMPORT    SetCSequencePrev
  568.     ENDIF
  569.  
  570.     IF GENERATING68K THEN
  571.         Macro
  572.         _SetCSequenceFlushProc
  573.             moveq    #51,d0
  574.             dc.w     $AAA3
  575.         EndM
  576.     ELSE
  577.         IMPORT    SetCSequenceFlushProc
  578.     ENDIF
  579.  
  580.     IF GENERATING68K THEN
  581.         Macro
  582.         _SetCSequenceKeyFrameRate
  583.             moveq    #54,d0
  584.             dc.w     $AAA3
  585.         EndM
  586.     ELSE
  587.         IMPORT    SetCSequenceKeyFrameRate
  588.     ENDIF
  589.  
  590.     IF GENERATING68K THEN
  591.         Macro
  592.         _GetCSequenceKeyFrameRate
  593.             dc.w     $203C
  594.             dc.w     $0008
  595.             dc.w     $004B
  596.             dc.w     $AAA3
  597.         EndM
  598.     ELSE
  599.         IMPORT    GetCSequenceKeyFrameRate
  600.     ENDIF
  601.  
  602.     IF GENERATING68K THEN
  603.         Macro
  604.         _GetCSequencePrevBuffer
  605.             moveq    #25,d0
  606.             dc.w     $AAA3
  607.         EndM
  608.     ELSE
  609.         IMPORT    GetCSequencePrevBuffer
  610.     ENDIF
  611.  
  612.     IF GENERATING68K THEN
  613.         Macro
  614.         _CDSequenceBusy
  615.             moveq    #26,d0
  616.             dc.w     $AAA3
  617.         EndM
  618.     ELSE
  619.         IMPORT    CDSequenceBusy
  620.     ENDIF
  621.  
  622.     IF GENERATING68K THEN
  623.         Macro
  624.         _CDSequenceEnd
  625.             moveq    #27,d0
  626.             dc.w     $AAA3
  627.         EndM
  628.     ELSE
  629.         IMPORT    CDSequenceEnd
  630.     ENDIF
  631.  
  632.     IF GENERATING68K THEN
  633.         Macro
  634.         _GetCompressedImageSize
  635.             moveq    #28,d0
  636.             dc.w     $AAA3
  637.         EndM
  638.     ELSE
  639.         IMPORT    GetCompressedImageSize
  640.     ENDIF
  641.  
  642.     IF GENERATING68K THEN
  643.         Macro
  644.         _GetSimilarity
  645.             moveq    #29,d0
  646.             dc.w     $AAA3
  647.         EndM
  648.     ELSE
  649.         IMPORT    GetSimilarity
  650.     ENDIF
  651.  
  652.     IF GENERATING68K THEN
  653.         Macro
  654.         _GetImageDescriptionCTable
  655.             moveq    #30,d0
  656.             dc.w     $AAA3
  657.         EndM
  658.     ELSE
  659.         IMPORT    GetImageDescriptionCTable
  660.     ENDIF
  661.  
  662.     IF GENERATING68K THEN
  663.         Macro
  664.         _SetImageDescriptionCTable
  665.             moveq    #31,d0
  666.             dc.w     $AAA3
  667.         EndM
  668.     ELSE
  669.         IMPORT    SetImageDescriptionCTable
  670.     ENDIF
  671.  
  672.     IF GENERATING68K THEN
  673.         Macro
  674.         _GetImageDescriptionExtension
  675.             moveq    #32,d0
  676.             dc.w     $AAA3
  677.         EndM
  678.     ELSE
  679.         IMPORT    GetImageDescriptionExtension
  680.     ENDIF
  681.  
  682.     IF GENERATING68K THEN
  683.         Macro
  684.         _SetImageDescriptionExtension
  685.             moveq    #33,d0
  686.             dc.w     $AAA3
  687.         EndM
  688.     ELSE
  689.         IMPORT    SetImageDescriptionExtension
  690.     ENDIF
  691.  
  692.     IF GENERATING68K THEN
  693.         Macro
  694.         _RemoveImageDescriptionExtension
  695.             dc.w     $203C
  696.             dc.w     $000C
  697.             dc.w     $003A
  698.             dc.w     $AAA3
  699.         EndM
  700.     ELSE
  701.         IMPORT    RemoveImageDescriptionExtension
  702.     ENDIF
  703.  
  704.     IF GENERATING68K THEN
  705.         Macro
  706.         _CountImageDescriptionExtensionType
  707.             dc.w     $203C
  708.             dc.w     $000C
  709.             dc.w     $003B
  710.             dc.w     $AAA3
  711.         EndM
  712.     ELSE
  713.         IMPORT    CountImageDescriptionExtensionType
  714.     ENDIF
  715.  
  716.     IF GENERATING68K THEN
  717.         Macro
  718.         _GetNextImageDescriptionExtensionType
  719.             dc.w     $203C
  720.             dc.w     $0008
  721.             dc.w     $003C
  722.             dc.w     $AAA3
  723.         EndM
  724.     ELSE
  725.         IMPORT    GetNextImageDescriptionExtensionType
  726.     ENDIF
  727.  
  728.     IF GENERATING68K THEN
  729.         Macro
  730.         _FindCodec
  731.             moveq    #35,d0
  732.             dc.w     $AAA3
  733.         EndM
  734.     ELSE
  735.         IMPORT    FindCodec
  736.     ENDIF
  737.  
  738.     IF GENERATING68K THEN
  739.         Macro
  740.         _CompressPicture
  741.             moveq    #36,d0
  742.             dc.w     $AAA3
  743.         EndM
  744.     ELSE
  745.         IMPORT    CompressPicture
  746.     ENDIF
  747.  
  748.     IF GENERATING68K THEN
  749.         Macro
  750.         _FCompressPicture
  751.             moveq    #37,d0
  752.             dc.w     $AAA3
  753.         EndM
  754.     ELSE
  755.         IMPORT    FCompressPicture
  756.     ENDIF
  757.  
  758.     IF GENERATING68K THEN
  759.         Macro
  760.         _CompressPictureFile
  761.             moveq    #38,d0
  762.             dc.w     $AAA3
  763.         EndM
  764.     ELSE
  765.         IMPORT    CompressPictureFile
  766.     ENDIF
  767.  
  768.     IF GENERATING68K THEN
  769.         Macro
  770.         _FCompressPictureFile
  771.             moveq    #39,d0
  772.             dc.w     $AAA3
  773.         EndM
  774.     ELSE
  775.         IMPORT    FCompressPictureFile
  776.     ENDIF
  777.  
  778.     IF GENERATING68K THEN
  779.         Macro
  780.         _GetPictureFileHeader
  781.             moveq    #40,d0
  782.             dc.w     $AAA3
  783.         EndM
  784.     ELSE
  785.         IMPORT    GetPictureFileHeader
  786.     ENDIF
  787.  
  788.     IF GENERATING68K THEN
  789.         Macro
  790.         _DrawPictureFile
  791.             moveq    #41,d0
  792.             dc.w     $AAA3
  793.         EndM
  794.     ELSE
  795.         IMPORT    DrawPictureFile
  796.     ENDIF
  797.  
  798.     IF GENERATING68K THEN
  799.         Macro
  800.         _DrawTrimmedPicture
  801.             moveq    #46,d0
  802.             dc.w     $AAA3
  803.         EndM
  804.     ELSE
  805.         IMPORT    DrawTrimmedPicture
  806.     ENDIF
  807.  
  808.     IF GENERATING68K THEN
  809.         Macro
  810.         _DrawTrimmedPictureFile
  811.             moveq    #47,d0
  812.             dc.w     $AAA3
  813.         EndM
  814.     ELSE
  815.         IMPORT    DrawTrimmedPictureFile
  816.     ENDIF
  817.  
  818.     IF GENERATING68K THEN
  819.         Macro
  820.         _MakeThumbnailFromPicture
  821.             moveq    #42,d0
  822.             dc.w     $AAA3
  823.         EndM
  824.     ELSE
  825.         IMPORT    MakeThumbnailFromPicture
  826.     ENDIF
  827.  
  828.     IF GENERATING68K THEN
  829.         Macro
  830.         _MakeThumbnailFromPictureFile
  831.             moveq    #43,d0
  832.             dc.w     $AAA3
  833.         EndM
  834.     ELSE
  835.         IMPORT    MakeThumbnailFromPictureFile
  836.     ENDIF
  837.  
  838.     IF GENERATING68K THEN
  839.         Macro
  840.         _MakeThumbnailFromPixMap
  841.             moveq    #44,d0
  842.             dc.w     $AAA3
  843.         EndM
  844.     ELSE
  845.         IMPORT    MakeThumbnailFromPixMap
  846.     ENDIF
  847.  
  848.     IF GENERATING68K THEN
  849.         Macro
  850.         _TrimImage
  851.             moveq    #45,d0
  852.             dc.w     $AAA3
  853.         EndM
  854.     ELSE
  855.         IMPORT    TrimImage
  856.     ENDIF
  857.  
  858.     IF GENERATING68K THEN
  859.         Macro
  860.         _ConvertImage
  861.             moveq    #48,d0
  862.             dc.w     $AAA3
  863.         EndM
  864.     ELSE
  865.         IMPORT    ConvertImage
  866.     ENDIF
  867.  
  868.     IF GENERATING68K THEN
  869.         Macro
  870.         _GetCompressedPixMapInfo
  871.             moveq    #55,d0
  872.             dc.w     $AAA3
  873.         EndM
  874.     ELSE
  875.         IMPORT    GetCompressedPixMapInfo
  876.     ENDIF
  877.  
  878.     IF GENERATING68K THEN
  879.         Macro
  880.         _SetCompressedPixMapInfo
  881.             moveq    #56,d0
  882.             dc.w     $AAA3
  883.         EndM
  884.     ELSE
  885.         IMPORT    SetCompressedPixMapInfo
  886.     ENDIF
  887.  
  888.     IF GENERATING68K THEN
  889.         Macro
  890.         _StdPix
  891.             moveq    #12,d0
  892.             dc.w     $AAA3
  893.         EndM
  894.     ELSE
  895.         IMPORT    StdPix
  896.     ENDIF
  897.  
  898.     IF GENERATING68K THEN
  899.         Macro
  900.         _TransformRgn
  901.             moveq    #57,d0
  902.             dc.w     $AAA3
  903.         EndM
  904.     ELSE
  905.         IMPORT    TransformRgn
  906.     ENDIF
  907.  
  908. ;**********
  909. ;    preview stuff
  910. ;**********
  911.     IF GENERATING68K THEN
  912.         Macro
  913.         _SFGetFilePreview
  914.             moveq    #65,d0
  915.             dc.w     $AAA3
  916.         EndM
  917.     ELSE
  918.         IMPORT    SFGetFilePreview
  919.     ENDIF
  920.  
  921.     IF GENERATING68K THEN
  922.         Macro
  923.         _SFPGetFilePreview
  924.             moveq    #66,d0
  925.             dc.w     $AAA3
  926.         EndM
  927.     ELSE
  928.         IMPORT    SFPGetFilePreview
  929.     ENDIF
  930.  
  931.     IF GENERATING68K THEN
  932.         Macro
  933.         _StandardGetFilePreview
  934.             moveq    #67,d0
  935.             dc.w     $AAA3
  936.         EndM
  937.     ELSE
  938.         IMPORT    StandardGetFilePreview
  939.     ENDIF
  940.  
  941.     IF GENERATING68K THEN
  942.         Macro
  943.         _CustomGetFilePreview
  944.             moveq    #68,d0
  945.             dc.w     $AAA3
  946.         EndM
  947.     ELSE
  948.         IMPORT    CustomGetFilePreview
  949.     ENDIF
  950.  
  951.     IF GENERATING68K THEN
  952.         Macro
  953.         _MakeFilePreview
  954.             moveq    #69,d0
  955.             dc.w     $AAA3
  956.         EndM
  957.     ELSE
  958.         IMPORT    MakeFilePreview
  959.     ENDIF
  960.  
  961.     IF GENERATING68K THEN
  962.         Macro
  963.         _AddFilePreview
  964.             moveq    #70,d0
  965.             dc.w     $AAA3
  966.         EndM
  967.     ELSE
  968.         IMPORT    AddFilePreview
  969.     ENDIF
  970.  
  971.  
  972. sfpItemPreviewAreaUser            EQU        11
  973. sfpItemPreviewStaticText        EQU        12
  974. sfpItemPreviewDividerUser        EQU        13
  975. sfpItemCreatePreviewButton        EQU        14
  976. sfpItemShowPreviewButton        EQU        15
  977.  
  978. PreviewResourceRecord     RECORD    0
  979. modDate                     ds.l    1
  980. version                     ds.w    1
  981. resType                     ds.l    1
  982. resID                     ds.w    1
  983. sizeof                     EQU    12
  984.                         ENDR
  985.  
  986.     IF GENERATING68K THEN
  987.         Macro
  988.         _AlignScreenRect
  989.             dc.w     $203C
  990.             dc.w     $0008
  991.             dc.w     $004C
  992.             dc.w     $AAA3
  993.         EndM
  994.     ELSE
  995.         IMPORT    AlignScreenRect
  996.     ENDIF
  997.  
  998.     IF GENERATING68K THEN
  999.         Macro
  1000.         _AlignWindow
  1001.             dc.w     $203C
  1002.             dc.w     $000E
  1003.             dc.w     $004D
  1004.             dc.w     $AAA3
  1005.         EndM
  1006.     ELSE
  1007.         IMPORT    AlignWindow
  1008.     ENDIF
  1009.  
  1010.     IF GENERATING68K THEN
  1011.         Macro
  1012.         _DragAlignedWindow
  1013.             dc.w     $203C
  1014.             dc.w     $0014
  1015.             dc.w     $004E
  1016.             dc.w     $AAA3
  1017.         EndM
  1018.     ELSE
  1019.         IMPORT    DragAlignedWindow
  1020.     ENDIF
  1021.  
  1022.     IF GENERATING68K THEN
  1023.         Macro
  1024.         _DragAlignedGrayRgn
  1025.             dc.w     $203C
  1026.             dc.w     $001E
  1027.             dc.w     $004F
  1028.             dc.w     $AAA3
  1029.         EndM
  1030.     ELSE
  1031.         IMPORT    DragAlignedGrayRgn
  1032.     ENDIF
  1033.  
  1034.     IF GENERATING68K THEN
  1035.         Macro
  1036.         _SetCSequenceDataRateParams
  1037.             dc.w     $203C
  1038.             dc.w     $0008
  1039.             dc.w     $0050
  1040.             dc.w     $AAA3
  1041.         EndM
  1042.     ELSE
  1043.         IMPORT    SetCSequenceDataRateParams
  1044.     ENDIF
  1045.  
  1046.     IF GENERATING68K THEN
  1047.         Macro
  1048.         _SetCSequenceFrameNumber
  1049.             dc.w     $203C
  1050.             dc.w     $0008
  1051.             dc.w     $0051
  1052.             dc.w     $AAA3
  1053.         EndM
  1054.     ELSE
  1055.         IMPORT    SetCSequenceFrameNumber
  1056.     ENDIF
  1057.  
  1058.     IF GENERATING68K THEN
  1059.         Macro
  1060.         _NewImageGWorld
  1061.             dc.w     $203C
  1062.             dc.w     $000C
  1063.             dc.w     $0052
  1064.             dc.w     $AAA3
  1065.         EndM
  1066.     ELSE
  1067.         IMPORT    NewImageGWorld
  1068.     ENDIF
  1069.  
  1070.     IF GENERATING68K THEN
  1071.         Macro
  1072.         _GetCSequenceDataRateParams
  1073.             dc.w     $203C
  1074.             dc.w     $0008
  1075.             dc.w     $0053
  1076.             dc.w     $AAA3
  1077.         EndM
  1078.     ELSE
  1079.         IMPORT    GetCSequenceDataRateParams
  1080.     ENDIF
  1081.  
  1082.     IF GENERATING68K THEN
  1083.         Macro
  1084.         _GetCSequenceFrameNumber
  1085.             dc.w     $203C
  1086.             dc.w     $0008
  1087.             dc.w     $0054
  1088.             dc.w     $AAA3
  1089.         EndM
  1090.     ELSE
  1091.         IMPORT    GetCSequenceFrameNumber
  1092.     ENDIF
  1093.  
  1094.     IF GENERATING68K THEN
  1095.         Macro
  1096.         _GetBestDeviceRect
  1097.             dc.w     $203C
  1098.             dc.w     $0008
  1099.             dc.w     $0055
  1100.             dc.w     $AAA3
  1101.         EndM
  1102.     ELSE
  1103.         IMPORT    GetBestDeviceRect
  1104.     ENDIF
  1105.  
  1106.     IF GENERATING68K THEN
  1107.         Macro
  1108.         _SetSequenceProgressProc
  1109.             dc.w     $203C
  1110.             dc.w     $0008
  1111.             dc.w     $0056
  1112.             dc.w     $AAA3
  1113.         EndM
  1114.     ELSE
  1115.         IMPORT    SetSequenceProgressProc
  1116.     ENDIF
  1117.  
  1118.     IF GENERATING68K THEN
  1119.         Macro
  1120.         _GDHasScale
  1121.             dc.w     $203C
  1122.             dc.w     $000A
  1123.             dc.w     $005A
  1124.             dc.w     $AAA3
  1125.         EndM
  1126.     ELSE
  1127.         IMPORT    GDHasScale
  1128.     ENDIF
  1129.  
  1130.     IF GENERATING68K THEN
  1131.         Macro
  1132.         _GDGetScale
  1133.             dc.w     $203C
  1134.             dc.w     $000C
  1135.             dc.w     $005B
  1136.             dc.w     $AAA3
  1137.         EndM
  1138.     ELSE
  1139.         IMPORT    GDGetScale
  1140.     ENDIF
  1141.  
  1142.     IF GENERATING68K THEN
  1143.         Macro
  1144.         _GDSetScale
  1145.             dc.w     $203C
  1146.             dc.w     $000A
  1147.             dc.w     $005C
  1148.             dc.w     $AAA3
  1149.         EndM
  1150.     ELSE
  1151.         IMPORT    GDSetScale
  1152.     ENDIF
  1153.  
  1154.     IF GENERATING68K THEN
  1155.         Macro
  1156.         _ICMShieldSequenceCursor
  1157.             dc.w     $203C
  1158.             dc.w     $0004
  1159.             dc.w     $0062
  1160.             dc.w     $AAA3
  1161.         EndM
  1162.     ELSE
  1163.         IMPORT    ICMShieldSequenceCursor
  1164.     ENDIF
  1165.  
  1166.     IF GENERATING68K THEN
  1167.         Macro
  1168.         _ICMDecompressComplete
  1169.             dc.w     $203C
  1170.             dc.w     $000C
  1171.             dc.w     $0063
  1172.             dc.w     $AAA3
  1173.         EndM
  1174.     ELSE
  1175.         IMPORT    ICMDecompressComplete
  1176.     ENDIF
  1177.  
  1178.     IF GENERATING68K THEN
  1179.         Macro
  1180.         _SetDSequenceTimeCode
  1181.             dc.w     $203C
  1182.             dc.w     $000C
  1183.             dc.w     $0064
  1184.             dc.w     $AAA3
  1185.         EndM
  1186.     ELSE
  1187.         IMPORT    SetDSequenceTimeCode
  1188.     ENDIF
  1189.  
  1190.  
  1191. identityMatrixType                EQU        $00                    ; result if matrix is identity 
  1192. translateMatrixType                EQU        $01                    ; result if matrix translates 
  1193. scaleMatrixType                    EQU        $02                    ; result if matrix scales 
  1194. scaleTranslateMatrixType        EQU        $03                    ; result if matrix scales and translates 
  1195. linearMatrixType                EQU        $04                    ; result if matrix is general 2 x 2 
  1196. linearTranslateMatrixType        EQU        $05                    ; result if matrix is general 2 x 2 and translates 
  1197. perspectiveMatrixType            EQU        $06                    ; result if matrix is general 3 x 3 
  1198.  
  1199.     IF GENERATING68K THEN
  1200.         Macro
  1201.         _GetMatrixType
  1202.             moveq    #20,d0
  1203.             dc.w     $ABC2
  1204.         EndM
  1205.     ELSE
  1206.         IMPORT    GetMatrixType
  1207.     ENDIF
  1208.  
  1209.     IF GENERATING68K THEN
  1210.         Macro
  1211.         _CopyMatrix
  1212.             moveq    #32,d0
  1213.             dc.w     $ABC2
  1214.         EndM
  1215.     ELSE
  1216.         IMPORT    CopyMatrix
  1217.     ENDIF
  1218.  
  1219.     IF GENERATING68K THEN
  1220.         Macro
  1221.         _EqualMatrix
  1222.             moveq    #33,d0
  1223.             dc.w     $ABC2
  1224.         EndM
  1225.     ELSE
  1226.         IMPORT    EqualMatrix
  1227.     ENDIF
  1228.  
  1229.     IF GENERATING68K THEN
  1230.         Macro
  1231.         _SetIdentityMatrix
  1232.             moveq    #21,d0
  1233.             dc.w     $ABC2
  1234.         EndM
  1235.     ELSE
  1236.         IMPORT    SetIdentityMatrix
  1237.     ENDIF
  1238.  
  1239.     IF GENERATING68K THEN
  1240.         Macro
  1241.         _TranslateMatrix
  1242.             moveq    #25,d0
  1243.             dc.w     $ABC2
  1244.         EndM
  1245.     ELSE
  1246.         IMPORT    TranslateMatrix
  1247.     ENDIF
  1248.  
  1249.     IF GENERATING68K THEN
  1250.         Macro
  1251.         _RotateMatrix
  1252.             moveq    #22,d0
  1253.             dc.w     $ABC2
  1254.         EndM
  1255.     ELSE
  1256.         IMPORT    RotateMatrix
  1257.     ENDIF
  1258.  
  1259.     IF GENERATING68K THEN
  1260.         Macro
  1261.         _ScaleMatrix
  1262.             moveq    #23,d0
  1263.             dc.w     $ABC2
  1264.         EndM
  1265.     ELSE
  1266.         IMPORT    ScaleMatrix
  1267.     ENDIF
  1268.  
  1269.     IF GENERATING68K THEN
  1270.         Macro
  1271.         _SkewMatrix
  1272.             moveq    #24,d0
  1273.             dc.w     $ABC2
  1274.         EndM
  1275.     ELSE
  1276.         IMPORT    SkewMatrix
  1277.     ENDIF
  1278.  
  1279.     IF GENERATING68K THEN
  1280.         Macro
  1281.         _TransformFixedPoints
  1282.             moveq    #34,d0
  1283.             dc.w     $ABC2
  1284.         EndM
  1285.     ELSE
  1286.         IMPORT    TransformFixedPoints
  1287.     ENDIF
  1288.  
  1289.     IF GENERATING68K THEN
  1290.         Macro
  1291.         _TransformPoints
  1292.             moveq    #35,d0
  1293.             dc.w     $ABC2
  1294.         EndM
  1295.     ELSE
  1296.         IMPORT    TransformPoints
  1297.     ENDIF
  1298.  
  1299.     IF GENERATING68K THEN
  1300.         Macro
  1301.         _TransformFixedRect
  1302.             moveq    #36,d0
  1303.             dc.w     $ABC2
  1304.         EndM
  1305.     ELSE
  1306.         IMPORT    TransformFixedRect
  1307.     ENDIF
  1308.  
  1309.     IF GENERATING68K THEN
  1310.         Macro
  1311.         _TransformRect
  1312.             moveq    #37,d0
  1313.             dc.w     $ABC2
  1314.         EndM
  1315.     ELSE
  1316.         IMPORT    TransformRect
  1317.     ENDIF
  1318.  
  1319.     IF GENERATING68K THEN
  1320.         Macro
  1321.         _InverseMatrix
  1322.             moveq    #28,d0
  1323.             dc.w     $ABC2
  1324.         EndM
  1325.     ELSE
  1326.         IMPORT    InverseMatrix
  1327.     ENDIF
  1328.  
  1329.     IF GENERATING68K THEN
  1330.         Macro
  1331.         _ConcatMatrix
  1332.             moveq    #27,d0
  1333.             dc.w     $ABC2
  1334.         EndM
  1335.     ELSE
  1336.         IMPORT    ConcatMatrix
  1337.     ENDIF
  1338.  
  1339.     IF GENERATING68K THEN
  1340.         Macro
  1341.         _RectMatrix
  1342.             moveq    #30,d0
  1343.             dc.w     $ABC2
  1344.         EndM
  1345.     ELSE
  1346.         IMPORT    RectMatrix
  1347.     ENDIF
  1348.  
  1349.     IF GENERATING68K THEN
  1350.         Macro
  1351.         _MapMatrix
  1352.             moveq    #29,d0
  1353.             dc.w     $ABC2
  1354.         EndM
  1355.     ELSE
  1356.         IMPORT    MapMatrix
  1357.     ENDIF
  1358.  
  1359.     ENDIF ; __IMAGECOMPRESSION__
  1360.